/*
 *  modeldata.h
 *  EncodeTest
 *
 *  Created by terry franguiadakis on 6/27/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */
#pragma once
#include <string>

namespace ModelData {
	
struct Anim 
{
    enum AnimType 
    {
        POS,SCALE,ROT,UVPOS,UVROT,UVSCALE,ATLAS,UNDEFINED
    };
    
    std::string name;
    std::vector<float>   from;
    std::vector<float>     to;
    float   duration;
    AnimType type;
};


struct Texture 
{
    enum TextureType 
    {
        PNG,ATLAS
    };
    
    std::string name;
    TextureType type;
};

struct TextureAtlas : public Texture 
{
    int xs, ys;  
};

struct Sequence 
{
    std::string name;
    std::vector<std::string> animNames;
    std::vector<Sequence*> children;
    int loop;  
};

struct Geom 
{
    enum GeomType 
    {
        QUAD, DEFAULT
    };
    Geom():type(DEFAULT){}
    
    GeomType type;
};

struct Model 
{    
    Model()
    {
        name = "model";
        texture = 0;
        pos[0] = pos[1] = 0.0f;
        rot = 0.0f; 
        scale[0] = scale[1] = 1.0f;
    }
    
    std::string name;
    Texture* texture;
    std::vector<Sequence*> sequences;
    std::vector<Model*>    children;
    Geom  geom;
    float pos[2];
    float rot;
    float scale[2];
};
 
} // 
